import request from '../utils/axios-config'

// 商品分类相关API
export function getCategoryList() {
  return request({
    url: '/admin/goodsCategory/list',
    method: 'get'
  })
}

export function getCategoryPage(params) {
  return request({
    url: '/admin/goodsCategory/page',
    method: 'get',
    params
  })
}

export function getCategoryDetail(id) {
  return request({
    url: `/admin/goodsCategory/detail/${id}`,
    method: 'get'
  })
}

export function saveOrUpdateCategory(data) {
  return request({
    url: '/admin/goodsCategory/saveOrUpdate',
    method: 'post',
    data
  })
}

export function deleteCategory(id) {
  return request({
    url: `/admin/goodsCategory/deleteById/${id}`,
    method: 'delete'
  })
} 